//Tue 19 Jan 2010 09:42:38 AM CST 
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

#define PI	3.14159265358979323

class RecursiveFigures
{
public:
	double getArea(int side, int K)
	{
		double sideLength = 1.0*side/2;
		double ret = PI*sideLength*sideLength;
		for(int i=1; i<K; i++)
		{
			sideLength /= sqrt(2.0);
			ret -= 4*sideLength*sideLength;
			ret += PI*sideLength*sideLength;
		}
		return ret;
	}
};
